import {createDocument, deleteDocument, fetchCollection, fetchDocument, updateDocument} from './actions'

export const MODEL = 'equipment_info';
export const URL = '/equipment_info';

export const fetchEquipment_infos = (params = {}) => {
    return fetchCollection(MODEL, URL, params, {idProperty: 'imsi'});
}

export const fetchEquipment_info = (imsi, params = {}) => {
    return fetchDocument(MODEL, imsi, `${URL}/${imsi}`, params, {idProperty: 'imsi'});
}

export const createEquipment_info = (params = {}, data = {}) => {
    return createDocument(MODEL, URL, params, data, {idProperty: 'imsi'});
}

export const updateEquipment_info = (imsi, params = {}, data = {}) => {
    return updateDocument(MODEL, imsi, `${URL}/${imsi}`, params, data, {idProperty: 'imsi'});
}

export const deleteEquipment_info = (imsi, params = {}) => {
    return deleteDocument(MODEL, imsi, `${URL}/${imsi}`, params, {idProperty: 'imsi'});
}
